
[#macro shopstoreShowView]
<div  class="model-form">
    <el-page-header @back="goBack" content="详情">
    </el-page-header>

        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
            <el-menu-item index="1">
                门店详情
            </el-menu-item>
        </el-menu>
        <div style="margin-top: 10px;">
            <router-view></router-view>
        </div>

</div>
[/#macro]
[#macro shopstoreShowConfig]
<script type="text/x-template" id="my-shopstore-show">
    [@shopstoreShowView /]
</script>
	<script type="text/javascript">
		//显示组件开始
		var shopstoreShowConfig = {};
		shopstoreShowConfig.template = "#my-shopstore-show";
		shopstoreShowConfig.methods =config.basicMethod();
		shopstoreShowConfig.data = function () {
			return {
				viewModel: {
				},
				activeIndex: "1"
			}
		};

		shopstoreShowConfig.methods.handleSelect = function (index) {
			console.log(index)
			var selectId = this.selectId;
			if (index == "1") {
				this.$router.replace({ path: '/view/index', query: { id: selectId, activeIndex: 1, time: Math.random() } })
			}
			else if (index == "2") {
				this.$router.replace({ path: '/view/members', query: { id: selectId, activeIndex: 2, time: Math.random() } })
			} else {

			}
		};

		shopstoreShowConfig.mounted = function () {
		   	var id = this.$route.query.id;
			var activeIndex = this.$route.query.activeIndex;

			var self = this;
			var data = {};
			data.id = id;
			this.selectId = data.id;
			if (activeIndex) {
				this.activeIndex = activeIndex;
			}
		}
		var shopstoreShowView = Vue.component('my-shopstore-view', shopstoreShowConfig);
		//显示组件结束		
	</script>
[/#macro]



[#macro childShopstoreView]
    <div >
        <el-form class="viewForm" label-width="80px">
            <el-col :span="22">
                <el-form-item label="商家名称">
                    <div v-html="viewModel.shopName">></div>
                </el-form-item>
            </el-col>
            <el-col :span="22">
                <el-form-item label="门头">
                    <div v-html="viewModel.logo">></div>
                </el-form-item>
            </el-col>
            <el-col :span="22">
                <el-form-item label="门店名称">
                    <div v-html="viewModel.name">></div>
                </el-form-item>
            </el-col>
            <el-col :span="22">
                <el-form-item label="联系电话">
                    <div v-html="viewModel.phone">></div>
                </el-form-item>
            </el-col>
            <el-col :span="22">
                <el-form-item label="详细地址">
                    <div v-html="viewModel.address">></div>
                </el-form-item>
            </el-col>
            <el-col :span="22">
                <el-form-item label="地图信息" size="mini">
                    <nb-map zoom="18" :lat="viewModel.lat" :lng="viewModel.lng" showOnly="true"></nb-map>
                </el-form-item>
            </el-col>
        </el-form>
    </div>
 [/#macro]

[#macro childShopstoreConfig]
    <script type="text/x-template" id="child-shopstore-show">
        [@childShopstoreView /]
    </script>
    <script type="text/javascript">

        var childShopstoreShowConfig = {};
        childShopstoreShowConfig.template = "#child-shopstore-show";
        childShopstoreShowConfig.methods = config.basicMethod();
        childShopstoreShowConfig.data = function () {
            return {
                viewModel: {
                }
            }
        };
        childShopstoreShowConfig.mounted = function () {
            var id = this.$route.query.id;
            var self = this;
            var data = {};
            data.id = id;
            this.postData("${siteurl}tenantRest/shopstore/view.htm", data, function (res) {
                if (res.code == 0) {
                    self.viewModel = res;

                }
            });
        }
        var childShopstoreShowView = Vue.component('child-shopstore-show', childShopstoreShowConfig);
    </script>
[/#macro]

